Learn R Programming

Rfast (version 1.2)

Column-wise mean absolute deviations: Colum-wise mean absolute deviations

Description

Colum-wise mean absolute deviations.

Usage

colMads(x, ncores = 2)

Arguments

x
A matrix with the data.
ncores
How many cores to use. If you specify 2 or more cores, parallel implementation takes place. Be careful not to put less than 1 or more cores than your system has.

Value

A vector with the column-wise mean absolute deviations.

Details

The functions is written in C++ in order to be as fast as possible.

See Also

colMedians, colVars, colMeans (buit-in R function)

Examples

Run this code
x <- matrix( rnorm(100 * 1000), ncol = 1000 )
system.time( colMads(x) )
a = colMads(x) 

Run the code above in your browser using DataLab